package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhOrderMoneyMapper;
import com.ruoyi.xh.domain.XhOrderMoney;
import com.ruoyi.xh.service.IXhOrderMoneyService;

/**
 * 分佣记录Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhOrderMoneyServiceImpl extends ServiceImpl<XhOrderMoneyMapper,XhOrderMoney> implements IXhOrderMoneyService {

    /**
     * 查询分佣记录
     * 
     * @param id 分佣记录主键
     * @return 分佣记录
     */
    @Override
    public XhOrderMoney selectXhOrderMoneyById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询分佣记录列表
     * 
     * @param xhOrderMoney 分佣记录
     * @return 分佣记录
     */
    @Override
    public Page<XhOrderMoney> selectXhOrderMoneyList(XhOrderMoney xhOrderMoney)
    {
        return new Page<>();
    }

    /**
     * 新增分佣记录
     * 
     * @param xhOrderMoney 分佣记录
     *
     */
    @Override
    public void insertXhOrderMoney(XhOrderMoney xhOrderMoney)
    {
        this.save(xhOrderMoney);
    }

    /**
     * 修改分佣记录
     * 
     * @param xhOrderMoney 分佣记录
     *
     */
    @Override
    public void updateXhOrderMoney(XhOrderMoney xhOrderMoney)
    {
        this.updateById(xhOrderMoney);
    }

    /**
     * 批量删除分佣记录
     * 
     * @param ids 需要删除的分佣记录主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhOrderMoneyByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
